tree grammar ExpTreeParser;

options {
  language = Java;
  output = AST;
  tokenVocab = ExpLexer;
  ASTLabelType = CommonTree;
}


tokens
{
  LISTA_INST;
}

@header {
   package com.pl;
}


instrucciones {float e;}
: -> ^(LISTA_INST
        (e=expr
         {System.out.println("Resultado: "+e);}
        )*
       )
;

expr returns [float result=0] {float izq=0, der=0;}
: n:NUMERO
  {result = Float.parseFloat(n.getText());}
;